[NA] [INFRA] chore: add Paperboy Cloud Build images#2
Open
Levi-Wu-777 wants to merge 2 commits into
Open
Conversation
Comment on lines
+65
to
+67
| echo "registry=${registry}" >> "$GITHUB_OUTPUT" | ||
| echo "tag=${tag}" >> "$GITHUB_OUTPUT" | ||
| echo "Submitting Cloud Build for ${registry}/<image>:${tag}" |
There was a problem hiding this comment.
Free-Form Tag Breaks Build Inputs
When a manual run supplies a tag containing a comma, newline, slash, colon, whitespace, or other invalid Docker tag character, this workflow writes it directly to $GITHUB_OUTPUT and then passes it into gcloud --substitutions and Docker image refs. That can corrupt the step output, make Cloud Build parse the tag as multiple substitutions, or fail the docker build/docker push with an invalid image reference.
Suggested change
| echo "registry=${registry}" >> "$GITHUB_OUTPUT" | |
| echo "tag=${tag}" >> "$GITHUB_OUTPUT" | |
| echo "Submitting Cloud Build for ${registry}/<image>:${tag}" | |
| if [[ ! "${tag}" =~ ^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$ ]]; then | |
| echo "Invalid image tag: ${tag}" >&2 | |
| echo "Tags must match [A-Za-z0-9_][A-Za-z0-9_.-]{0,127}." >&2 | |
| exit 1 | |
| fi | |
| echo "registry=${registry}" >> "$GITHUB_OUTPUT" | |
| echo "tag=${tag}" >> "$GITHUB_OUTPUT" | |
| echo "Submitting Cloud Build for ${registry}/<image>:${tag}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Add a Paperboy-owned image build path for the
paperboytm/opikfork. The workflow resolves a Paperboy image tag, submits the build to Google Cloud Build, and publishes the four Opik runtime images into Paperboy Artifact Registry.cloudbuild.paperboy-images.yamlwithE2_HIGHCPU_32, 200GB disk, BuildKit-enabled Docker builds, and parallel backend/frontend/sandbox builds..gcloudignore.paperboy-imagesso Cloud Build uploads only the image build contexts instead of local caches such asnode_modules.PAPERBOY_IMAGE_BUILD.md, a Paperboy runbook for tag selection, GCP setup, manual Cloud Build, workflow dispatch, GAR verification, Platform deployment linkage, and common failure modes.Operational prerequisite: the GitHub workflow expects
secrets.GCP_SA_KEYto be configured forpaperboytm/opikor itsgoogle-cloud-prodenvironment. The current manual verification used localgcloudauth instead.Impact
This does not change Opik application behavior. It adds Paperboy infrastructure and documentation for building fork-owned images so Paperboy deployments can run images from
us-central1-docker.pkg.dev/gen-lang-client-0436525842/paperboyinstead of official upstream application images.Test
ruby -e 'require "yaml"; %w[.github/workflows/paperboy-build-images.yml cloudbuild.paperboy-images.yaml].each { |f| YAML.load_file(f); puts "#{f} ok" }'awk '/^```/{c++} END{print c, (c%2==0 ? "fences balanced" : "fences unbalanced")}' PAPERBOY_IMAGE_BUILD.md->74 fences balancedgcloud meta list-files-for-upload .with.gcloudignore.paperboy-imagestemporarily copied to.gcloudignore, confirming 5876 upload files and nonode_modulesupload.gcloud builds submit --project=gen-lang-client-0436525842 --config=cloudbuild.paperboy-images.yaml --substitutions="_REGISTRY=us-central1-docker.pkg.dev/gen-lang-client-0436525842/paperboy,_TAG=2.1.11-paperboy-d80c0bfb59b0" --ignore-file=.gcloudignore.paperboy-images .b2676833-d39f-467b-a712-d89d36f754de, duration 3m58s.gcloud artifacts docker tags listfor all four images:opik-sandbox-executor-python:2.1.11-paperboy-d80c0bfb59b0->sha256:e0beed45de29f724fa67d12124538f5294f3a7b75fd98a726603b7bee667aa4aopik-backend:2.1.11-paperboy-d80c0bfb59b0->sha256:395cefa6e21b15efd470d9cb7809e121a9fedae8c647e0aac4631010f4f3a199opik-python-backend:2.1.11-paperboy-d80c0bfb59b0->sha256:da561eeec69dcd2876e70d4dddd3191581389e2f1ad84be52fcd6e3c00c51725opik-frontend:2.1.11-paperboy-d80c0bfb59b0->sha256:2155a9c952749390727fa3986c1fe4b554696c57b441b215d5cab3e1ee5d58ccactionlintwas not installed locally; workflow syntax was checked with YAML parsing and should still be linted by CI.Rollback
Revert this PR to remove the Paperboy workflow, Cloud Build config, and runbook. Already-pushed GAR images are immutable deployment artifacts and can be left unused; Platform deployments can roll back by pointing Helm values back to the official upstream image registry/tag.
Change checklist
Issues
No Jira issue.
AI-WATERMARK
AI-WATERMARK: yes
gcloud,gh, Docker/Cloud Build, GitHub Actions YAML validationTesting
See
## Testabove for exact commands, build id, pushed image digests, and doc validation. This PR does not include UI behavior changes, so no browser recording was produced.Documentation
Added root-level Paperboy runbook:
PAPERBOY_IMAGE_BUILD.md.